from selenium import webdriver

url = 'https://www.baidu.com'

driver = webdriver.Chrome(executable_path=r'E:\ChromeDriver\chromedriver_win32/chromedriver.exe')

driver.get(url)

try:
    driver.find_element_by_xpath('//*[@id="kwjkj"]')
except:
    print('cuowu')


